package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.Course;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.CoursePricing;
import com.xmy.cultivate.entity.views.StudentCourse;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程表 服务类
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
public interface ICourseService extends IService<Course> {

    public abstract boolean saveTo(Course course);

    public abstract boolean updateTo(Course course,List schoolIdList);

    public abstract IPage<Course> checkCourse(IPage<?> page, Wrapper wrapper,Map<String,Object> map);

    public abstract IPage<Course> findAll(IPage<?> page,@Param(Constants.WRAPPER) Wrapper wrapper);

    public abstract Course findOne(@Param("id") Long id);

    public abstract List<CoursePricing> coursePricingList(@Param("id") Long id);

    public abstract List<CoursePricing> coursePricingForSchoolIdList(@Param("id") Long id,@Param("school_id") Long school_id);

    public abstract IPage<StudentCourse> studentCourse(IPage<?> page,Wrapper wrapper);

    public abstract boolean deleteForId(Long id);

}
